package com.twu.biblioteca.model;

/**
 * Created by akutschm on 06/05/2014.
 */
public class User {
    private final String login;
    private final String password;
    private final String name;
    private final String email;
    private final String phone;

    public User(String login, String password, String name, String email, String phone) {
        if (login == null || !login.matches("[0-9]{3}-[0-9]{4}")) {
            throw new IllegalArgumentException();
        }
        this.login = login;
        this.password = password;
        this.name = name;
        this.email = email;
        this.phone = phone;
    }

    public String getLogin() {
        return login;
    }

    public String getPassword() {
        return password;
    }

    public String getName() {return name;}

    public String getEmail() {return email;}

    public String getPhone() {return phone;}
}
